
package nbcp.db.mongo.table

import org.slf4j.LoggerFactory
import nbcp.base.extend.*
import nbcp.base.utils.*
import nbcp.db.mongo.entity.*
import nbcp.db.mongo.*
import nbcp.db.*

//generate auto @2019-09-10 13:13:42

class IdNameMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val name=join(this._pname, "name")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class IntCodeNameMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val code=join(this._pname, "code")
    val name=join(this._pname, "name")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class IdUrlMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val url=join(this._pname, "url")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class ProductCardMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val name=join(this._pname, "name")
    val logo=IdUrlMeta(join(this._pname,"logo"))
    val category=IdCodeNameMeta(join(this._pname,"category"))
    val guidePrice=join(this._pname, "guidePrice")
    val salePrice=join(this._pname, "salePrice")
    val stock=join(this._pname, "stock")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class IdCodeNameMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val code=join(this._pname, "code")
    val name=join(this._pname, "name")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class InvoiceDataMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val name=join(this._pname, "name")
    val type=join(this._pname, "type")
    val default=join(this._pname, "default")
    val corpNumber=join(this._pname, "corpNumber")
    val address=join(this._pname, "address")
    val phone=join(this._pname, "phone")
    val bankName=join(this._pname, "bankName")
    val bankAccount=join(this._pname, "bankAccount")
    val license=IdUrlMeta(join(this._pname,"license"))
    val bankImage=IdUrlMeta(join(this._pname,"bankImage"))
    val taxpayer=IdUrlMeta(join(this._pname,"taxpayer"))

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class SysCorporation_ReceiveAddressMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val alias=join(this._pname, "alias")
    val userName=join(this._pname, "userName")
    val city=IntCodeNameMeta(join(this._pname,"city"))
    val address=join(this._pname, "address")
    val mobile=join(this._pname, "mobile")
    val email=join(this._pname, "email")
    val default=join(this._pname, "default")
    val createAt=join(this._pname, "createAt")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class WxUserInfoRefMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val openId=join(this._pname, "openId")
    val name=join(this._pname, "name")
    val logo=join(this._pname, "logo")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class OrderInfo_ProductItemMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val product=IdNameUrlMeta(join(this._pname,"product"))
    val skuDefine=join(this._pname, "skuDefine")
    val number=join(this._pname, "number")
    val amount=join(this._pname, "amount")
    val price=join(this._pname, "price")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class OrderInfo_PayInfoMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val remark=join(this._pname, "remark")
    val mobile=join(this._pname, "mobile")
    val payType=join(this._pname, "payType")
    val invoice=InvoiceDataMeta(join(this._pname,"invoice"))
    val payAmount=join(this._pname, "payAmount")
    val freight=join(this._pname, "freight")
    val paySysMessage=join(this._pname, "paySysMessage")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class OrderInfo_OperationItemMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val createAt=join(this._pname, "createAt")
    val createBy=IdNameMeta(join(this._pname,"createBy"))
    val status=join(this._pname, "status")
    val remark=join(this._pname, "remark")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}


class IdNameUrlMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val id=join(this._pname, "_id")
    val name=join(this._pname, "name")
    val url=join(this._pname, "url")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class KeyValueStringMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val key=join(this._pname, "key")
    val value=join(this._pname, "value")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}

class ProductSkuStockPriceMeta (private val _pname:String):MongoColumnName() {
    constructor(_val:MongoColumnName):this(_val.toString()) {}

    val skuDefine=join(this._pname, "skuDefine")
    val stock=join(this._pname, "stock")
    val code=join(this._pname, "code")
    val activityPrice=join(this._pname, "activityPrice")
    val salePrice=join(this._pname, "salePrice")

    override fun toString(): String {
        return join(this._pname).toString()
    }
}


class SystemGroup : IDataGroup{
    override fun getEntities():Set<BaseDbEntity> = setOf(annexTag,mobileCodeLog,mqLog,notifyMessage,sysAnnex,sysCity,sysCorporation,sysDictionary,sysLog,sysLoginLog,sysLoginUser,sysUser,traceLog,userShareLog,versionData)

    val annexTag=AnnexTagEntity();
    val mobileCodeLog=MobileCodeLogEntity();
    val mqLog=MqLogEntity();
    val notifyMessage=NotifyMessageEntity();
    val sysAnnex=SysAnnexEntity();
    val sysCity=SysCityEntity();
    val sysCorporation=SysCorporationEntity();
    val sysDictionary=SysDictionaryEntity();
    val sysLog=SysLogEntity();
    val sysLoginLog=SysLoginLogEntity();
    val sysLoginUser=SysLoginUserEntity();
    val sysUser=SysUserEntity();
    val traceLog=TraceLogEntity();
    val userShareLog=UserShareLogEntity();
    val versionData=VersionDataEntity();


    class AnnexTagEntity():MongoBaseEntity<AnnexTag>(AnnexTag::class.java,"annexTag") {
        val tag=MongoColumnName("tag")
        val corpId=MongoColumnName("corpId")
        val id=MongoColumnName("_id")
    
    }
    
    class MobileCodeLogEntity():MongoBaseEntity<MobileCodeLog>(MobileCodeLog::class.java,"mobileCodeLog") {
        val module=MongoColumnName("module")
        val mobile=MongoColumnName("mobile")
        val code=MongoColumnName("code")
        val bizId=MongoColumnName("bizId")
        val errorMessage=MongoColumnName("errorMessage")
        val isUsed=MongoColumnName("isUsed")
        val createAt=MongoColumnName("createAt")
        val sentAt=MongoColumnName("sentAt")
        val arrivedAt=MongoColumnName("arrivedAt")
        val usedAt=MongoColumnName("usedAt")
        val id=MongoColumnName("_id")
    
    }
    
    class MqLogEntity():MongoBaseEntity<MqLog>(MqLog::class.java,"mqLog") {
        val name=MongoColumnName("name")
        val createAt=MongoColumnName("createAt")
        val arrivedAt=MongoColumnName("arrivedAt")
        val body=MongoColumnName("body")
        val sendErrorMessage=MongoColumnName("sendErrorMessage")
        val isDone=MongoColumnName("isDone")
        val consumeAt=MongoColumnName("consumeAt")
        val result=MongoColumnName("result")
        val id=MongoColumnName("_id")
    
    }
    
    class NotifyMessageEntity():MongoBaseEntity<NotifyMessage>(NotifyMessage::class.java,"notifyMessage") {
        val type=MongoColumnName("type")
        val title=MongoColumnName("title")
        val content=MongoColumnName("content")
        val isRead=MongoColumnName("isRead")
        val extDbId=MongoColumnName("extDbId")
        val user=IdNameMeta("user")
        val isPushed=MongoColumnName("isPushed")
        val createAt=MongoColumnName("createAt")
        val readAt=MongoColumnName("readAt")
        val id=MongoColumnName("_id")
    
    }
    
    class SysAnnexEntity():MongoBaseEntity<SysAnnex>(SysAnnex::class.java,"sysAnnex") {
        val name=MongoColumnName("name")
        val ext=MongoColumnName("ext")
        val size=MongoColumnName("size")
        val checkCode=MongoColumnName("checkCode")
        val imgWidth=MongoColumnName("imgWidth")
        val imgHeight=MongoColumnName("imgHeight")
        val url=MongoColumnName("url")
        val createBy=IdNameMeta("createBy")
        val corpId=MongoColumnName("corpId")
        val errorMsg=MongoColumnName("errorMsg")
        val createAt=MongoColumnName("createAt")
        val id=MongoColumnName("_id")
    
    }
    
    class SysCityEntity():MongoBaseEntity<SysCity>(SysCity::class.java,"sysCity") {
        val code=MongoColumnName("code")
        val name=MongoColumnName("name")
        val fullName=MongoColumnName("fullName")
        val level=MongoColumnName("level")
        val lng=MongoColumnName("lng")
        val lat=MongoColumnName("lat")
        val pinyin=MongoColumnName("pinyin")
        val telCode=MongoColumnName("telCode")
        val postCode=MongoColumnName("postCode")
        val pcode=MongoColumnName("pcode")
        val id=MongoColumnName("_id")
    
    }
    
    class SysCorporationEntity():MongoBaseEntity<SysCorporation>(SysCorporation::class.java,"sysCorporation") {
        val name=MongoColumnName("name")
        val city=IntCodeNameMeta("city")
        val address=MongoColumnName("address")
        val phone=MongoColumnName("phone")
        val weixin=MongoColumnName("weixin")
        val industry=IdNameMeta("industry")
        val logo=IdUrlMeta("logo")
        val qualifications=IdUrlMeta("qualifications")
        val images=IdUrlMeta("images")
        val detail=MongoColumnName("detail")
        val createAt=MongoColumnName("createAt")
        val updateAt=MongoColumnName("updateAt")
        val isLocked=MongoColumnName("isLocked")
        val lockedRemark=MongoColumnName("lockedRemark")
        val id=MongoColumnName("_id")
    
    }
    
    class SysDictionaryEntity():MongoBaseEntity<SysDictionary>(SysDictionary::class.java,"sysDictionary") {
        val code=MongoColumnName("code")
        val value=MongoColumnName("value")
        val sort=MongoColumnName("sort")
        val group=MongoColumnName("group")
        val corpId=MongoColumnName("corpId")
        val id=MongoColumnName("_id")
    
    }
    
    class SysLogEntity():MongoBaseEntity<SysLog>(SysLog::class.java,"sysLog") {
        val msg=MongoColumnName("msg")
        val creatAt=MongoColumnName("creatAt")
        val createBy=MongoColumnName("createBy")
        val type=MongoColumnName("type")
        val clientIp=MongoColumnName("clientIp")
        val module=MongoColumnName("module")
        val remark=MongoColumnName("remark")
        val id=MongoColumnName("_id")
    
    }
    
    class SysLoginLogEntity():MongoBaseEntity<SysLoginLog>(SysLoginLog::class.java,"sysLoginLog") {
        val loginName=MongoColumnName("loginName")
        val password=MongoColumnName("password")
        val app=MongoColumnName("app")
        val clientIp=MongoColumnName("clientIp")
        val createAt=MongoColumnName("createAt")
        val client=MongoColumnName("client")
        val remark=MongoColumnName("remark")
        val id=MongoColumnName("_id")
    
    }
    
    class SysLoginUserEntity():MongoBaseEntity<SysLoginUser>(SysLoginUser::class.java,"sysLoginUser") {
        val loginName=MongoColumnName("loginName")
        val password=MongoColumnName("password")
        val lastLoginAt=MongoColumnName("lastLoginAt")
        val errorLoginTimes=MongoColumnName("errorLoginTimes")
        val isLocked=MongoColumnName("isLocked")
        val forget_password=MongoColumnName("forget_password")
        val lockedRemark=MongoColumnName("lockedRemark")
        val id=MongoColumnName("_id")
    
    }
    
    class SysUserEntity():MongoBaseEntity<SysUser>(SysUser::class.java,"sysUser") {
        val loginName=MongoColumnName("loginName")
        val name=MongoColumnName("name")
        val logo=IdUrlMeta("logo")
        val mobile=MongoColumnName("mobile")
        val email=MongoColumnName("email")
        val birthday=MongoColumnName("birthday")
        val sex=MongoColumnName("sex")
        val location=MongoColumnName("location")
        val corp=IdNameMeta("corp")
        val wxOpenId=MongoColumnName("wxOpenId")
        val lastLoginAt=MongoColumnName("lastLoginAt")
        val token=MongoColumnName("token")
        val createAt=MongoColumnName("createAt")
        val updateAt=MongoColumnName("updateAt")
        val id=MongoColumnName("_id")
    
    }
    
    class TraceLogEntity():MongoBaseEntity<TraceLog>(TraceLog::class.java,"traceLog") {
        val traceId=MongoColumnName("traceId")
        val host=MongoColumnName("host")
        val type=MongoColumnName("type")
        val url=MongoColumnName("url")
        val method=MongoColumnName("method")
        val header=MongoColumnName("header")
        val body=MongoColumnName("body")
        val createBy=MongoColumnName("createBy")
        val createAt=MongoColumnName("createAt")
        val clientIp=MongoColumnName("clientIp")
        val id=MongoColumnName("_id")
    
    }
    
    class UserShareLogEntity():MongoBaseEntity<UserShareLog>(UserShareLog::class.java,"userShareLog") {
        val sharer=IdNameMeta("sharer")
        val recver=IdNameMeta("recver")
        val url=MongoColumnName("url")
        val createAt=MongoColumnName("createAt")
        val id=MongoColumnName("_id")
    
    }
    
    class VersionDataEntity():MongoBaseEntity<VersionData>(VersionData::class.java,"versionData") {
        val client=MongoColumnName("client")
        val version=MongoColumnName("version")
        val remark=MongoColumnName("remark")
        val url=IdUrlMeta("url")
        val mustUpdate=MongoColumnName("mustUpdate")
        val publishAt=MongoColumnName("publishAt")
        val id=MongoColumnName("_id")
    
    }
    
}

class ShopGroup : IDataGroup{
    override fun getEntities():Set<BaseDbEntity> = setOf(article,articleGroup,homeData,shoppingCart,shopUser,sysCategory,sysCoupon,wxFormId)

    val article=ArticleEntity();
    val articleGroup=ArticleGroupEntity();
    val homeData=HomeDataEntity();
    val shoppingCart=ShoppingCartEntity();
    val shopUser=ShopUserEntity();
    val sysCategory=SysCategoryEntity();
    val sysCoupon=SysCouponEntity();
    val wxFormId=WxFormIdEntity();


    class ArticleEntity():MongoBaseEntity<Article>(Article::class.java,"article") {
        val title=MongoColumnName("title")
        val authoer=MongoColumnName("authoer")
        val logo=IdUrlMeta("logo")
        val source=MongoColumnName("source")
        val body=MongoColumnName("body")
        val name=MongoColumnName("name")
        val group=MongoColumnName("group")
        val module=MongoColumnName("module")
        val corpId=MongoColumnName("corpId")
        val order=MongoColumnName("order")
        val createAt=MongoColumnName("createAt")
        val id=MongoColumnName("_id")
    
    }
    
    class ArticleGroupEntity():MongoBaseEntity<ArticleGroup>(ArticleGroup::class.java,"articleGroup") {
        val group=MongoColumnName("group")
        val module=MongoColumnName("module")
        val order=MongoColumnName("order")
        val corpId=MongoColumnName("corpId")
        val createAt=MongoColumnName("createAt")
        val id=MongoColumnName("_id")
    
    }
    
    class HomeDataEntity():MongoBaseEntity<HomeData>(HomeData::class.java,"homeData") {
        val corpId=MongoColumnName("corpId")
        val hot1=ProductCardMeta("hot1")
        val hot2=ProductCardMeta("hot2")
        val hot3=ProductCardMeta("hot3")
        val hot4=ProductCardMeta("hot4")
        val hot5=ProductCardMeta("hot5")
        val new1=ProductCardMeta("new1")
        val new2=ProductCardMeta("new2")
        val new3=ProductCardMeta("new3")
        val recent1=ProductCardMeta("recent1")
        val recent2=ProductCardMeta("recent2")
        val recent3=ProductCardMeta("recent3")
        val recent4=ProductCardMeta("recent4")
        val id=MongoColumnName("_id")
    
    }
    
    class ShoppingCartEntity():MongoBaseEntity<ShoppingCart>(ShoppingCart::class.java,"shoppingCart") {
        val product=IdNameMeta("product")
        val number=MongoColumnName("number")
        val price=MongoColumnName("price")
        val checked=MongoColumnName("checked")
        val createBy=IdNameMeta("createBy")
        val createAt=MongoColumnName("createAt")
        val corp=IdNameMeta("corp")
        val id=MongoColumnName("_id")
    
    }
    
    class ShopUserEntity():MongoBaseEntity<ShopUser>(ShopUser::class.java,"shopUser") {
        val level=MongoColumnName("level")
        val logo=MongoColumnName("logo")
        val password=MongoColumnName("password")
        val invoices=InvoiceDataMeta("invoices")
        val receiveAddresses=SysCorporation_ReceiveAddressMeta("receiveAddresses")
        val createAt=MongoColumnName("createAt")
        val loginName=MongoColumnName("loginName")
        val idCardNumber=MongoColumnName("idCardNumber")
        val email=MongoColumnName("email")
        val mobile=MongoColumnName("mobile")
        val qq=MongoColumnName("qq")
        val birthday=MongoColumnName("birthday")
        val wxOpenId=MongoColumnName("wxOpenId")
        val sex=MongoColumnName("sex")
        val name=MongoColumnName("name")
        val id=MongoColumnName("_id")
    
    }
    
    class SysCategoryEntity():MongoBaseEntity<SysCategory>(SysCategory::class.java,"sysCategory") {
        val code=MongoColumnName("code")
        val name=MongoColumnName("name")
        val english=MongoColumnName("english")
        val pcode=MongoColumnName("pcode")
        val logo=IdUrlMeta("logo")
        val order=MongoColumnName("order")
        val corpId=MongoColumnName("corpId")
        val banner=IdUrlMeta("banner")
        val id=MongoColumnName("_id")
    
    }
    
    class SysCouponEntity():MongoBaseEntity<SysCoupon>(SysCoupon::class.java,"sysCoupon") {
        val startAt=MongoColumnName("startAt")
        val endAt=MongoColumnName("endAt")
        val id=MongoColumnName("_id")
    
    }
    
    class WxFormIdEntity():MongoBaseEntity<WxFormId>(WxFormId::class.java,"wxFormId") {
        val openId=MongoColumnName("openId")
        val createAt=MongoColumnName("createAt")
        val formId=MongoColumnName("formId")
        val prePayId=MongoColumnName("prePayId")
        val used=MongoColumnName("used")
        val usedAt=MongoColumnName("usedAt")
        val id=MongoColumnName("_id")
    
    }
    
}

class AdminGroup : IDataGroup{
    override fun getEntities():Set<BaseDbEntity> = setOf(adminLoginUser,adminUser)

    val adminLoginUser=AdminLoginUserEntity();
    val adminUser=AdminUserEntity();


    class AdminLoginUserEntity():MongoBaseEntity<AdminLoginUser>(AdminLoginUser::class.java,"adminLoginUser") {
        val loginName=MongoColumnName("loginName")
        val password=MongoColumnName("password")
        val lastLoginAt=MongoColumnName("lastLoginAt")
        val errorLoginTimes=MongoColumnName("errorLoginTimes")
        val isLocked=MongoColumnName("isLocked")
        val lockedRemark=MongoColumnName("lockedRemark")
        val id=MongoColumnName("_id")
    
    }
    
    class AdminUserEntity():MongoBaseEntity<AdminUser>(AdminUser::class.java,"adminUser") {
        val loginName=MongoColumnName("loginName")
        val name=MongoColumnName("name")
        val logo=IdUrlMeta("logo")
        val mobile=MongoColumnName("mobile")
        val sex=MongoColumnName("sex")
        val qq=MongoColumnName("qq")
        val token=MongoColumnName("token")
        val createAt=MongoColumnName("createAt")
        val updateAt=MongoColumnName("updateAt")
        val id=MongoColumnName("_id")
    
    }
    
}

class InfoGroup : IDataGroup{
    override fun getEntities():Set<BaseDbEntity> = setOf(applyInfo,expressInfo,orderInfo,productInfo,refundInfo,stockInfo)

    val applyInfo=ApplyInfoEntity();
    val expressInfo=ExpressInfoEntity();
    val orderInfo=OrderInfoEntity();
    val productInfo=ProductInfoEntity();
    val refundInfo=RefundInfoEntity();
    val stockInfo=StockInfoEntity();


    class ApplyInfoEntity():MongoBaseEntity<ApplyInfo>(ApplyInfo::class.java,"applyInfo") {
        val name=MongoColumnName("name")
        val mobile=MongoColumnName("mobile")
        val corpName=MongoColumnName("corpName")
        val trade=MongoColumnName("trade")
        val id=MongoColumnName("_id")
    
    }
    
    class ExpressInfoEntity():MongoBaseEntity<ExpressInfo>(ExpressInfo::class.java,"expressInfo") {
        val createAt=MongoColumnName("createAt")
        val createBy=IdNameMeta("createBy")
        val corp=IdNameMeta("corp")
        val site=MongoColumnName("site")
        val name=MongoColumnName("name")
        val remark=MongoColumnName("remark")
        val id=MongoColumnName("_id")
    
    }
    
    class OrderInfoEntity():MongoBaseEntity<OrderInfo>(OrderInfo::class.java,"orderInfo") {
        val orderCode=MongoColumnName("orderCode")
        val status=MongoColumnName("status")
        val createAt=MongoColumnName("createAt")
        val createBy=WxUserInfoRefMeta("createBy")
        val corp=IdNameMeta("corp")
        val receiveAddress=SysCorporation_ReceiveAddressMeta("receiveAddress")
        val express=IdNameMeta("express")
        val expressNumber=MongoColumnName("expressNumber")
        val details=OrderInfo_ProductItemMeta("details")
        val payInfo=OrderInfo_PayInfoMeta("payInfo")
        val amount=MongoColumnName("amount")
        val amount_discount=MongoColumnName("amount_discount")
        val operations=OrderInfo_OperationItemMeta("operations")
        val headerOrderCode=MongoColumnName("headerOrderCode")
        val groupOrderCount=MongoColumnName("groupOrderCount")
        val sentAt=MongoColumnName("sentAt")
        val evaluate=MongoColumnName("evaluate")
        val receiveAt=MongoColumnName("receiveAt")
        val remark=MongoColumnName("remark")
        val id=MongoColumnName("_id")
    
    }
    
    class ProductInfoEntity():MongoBaseEntity<ProductInfo>(ProductInfo::class.java,"productInfo") {
        val name=MongoColumnName("name")
        val slogan=MongoColumnName("slogan")
        val category=IdCodeNameMeta("category")
        val barCode=MongoColumnName("barCode")
        val parameters=KeyValueStringMeta("parameters")
        val showImages=IdUrlMeta("showImages")
        val images=IdUrlMeta("images")
        val status=MongoColumnName("status")
        val video=IdUrlMeta("video")
        val detail=MongoColumnName("detail")
        val remark=MongoColumnName("remark")
        val corp=IdNameMeta("corp")
        val guidePrice=MongoColumnName("guidePrice")
        val length=MongoColumnName("length")
        val width1=MongoColumnName("width1")
        val width2=MongoColumnName("width2")
        val height=MongoColumnName("height")
        val thick=MongoColumnName("thick")
        val createAt=MongoColumnName("createAt")
        val skuDefines=KeyValueStringMeta("skuDefines")
        val skuStockPrice=ProductSkuStockPriceMeta("skuStockPrice")
        val material=MongoColumnName("material")
        val saleCount=MongoColumnName("saleCount")
        val freight=MongoColumnName("freight")
        val id=MongoColumnName("_id")
    
    }
    
    class RefundInfoEntity():MongoBaseEntity<RefundInfo>(RefundInfo::class.java,"refundInfo") {
        val orderCode=MongoColumnName("orderCode")
        val refundCode=MongoColumnName("refundCode")
        val createAt=MongoColumnName("createAt")
        val orderAmount=MongoColumnName("orderAmount")
        val refundAmount=MongoColumnName("refundAmount")
        val reason=MongoColumnName("reason")
        val status=MongoColumnName("status")
        val sysCode=MongoColumnName("sysCode")
        val sysMessage=MongoColumnName("sysMessage")
        val id=MongoColumnName("_id")
    
    }
    
    class StockInfoEntity():MongoBaseEntity<StockInfo>(StockInfo::class.java,"stockInfo") {
        val name=MongoColumnName("name")
        val city=IntCodeNameMeta("city")
        val address=MongoColumnName("address")
        val remark=MongoColumnName("remark")
        val createAt=MongoColumnName("createAt")
        val createBy=IdNameMeta("createBy")
        val corp=IdNameMeta("corp")
        val id=MongoColumnName("_id")
    
    }
    
}



private fun join(vararg args:String): MongoColumnName{
    return MongoColumnName( args.toList().filter{it.HasValue}.joinToString (".") )
}

private fun join_map(vararg args:String):moer_map{
    return moer_map(args.toList().filter{it.HasValue}.joinToString ("."))
}

data class moer_map(val _pname:String)
{
    fun keys(keys:String):String{
        return this._pname + "." + keys
    }
}


